//
//  EventEditor.swift
//  demo1
//
//  Created by raymond on 2022/5/15.
//

import SwiftUI

struct EventEditor: View {
  @Binding var event: Event
  var isNew: Bool
  
  var body: some View {
    List {
      ForEach(event.tasks){ task in
        Text(task.text)
      }
    }
  }
}

struct EventEditor_Previews: PreviewProvider {
  @State private static var newEvent = Event()
  static var previews: some View {
    EventEditor(event:$newEvent, isNew:true)
  }
}
